package designpattern.struct.decorator;/**
 * Description
 * <p>
 * </p>
 * DATE 2020/3/29.
 *
 * @author cuihao.
 */

/**
 * @program: ch-general
 * @description:
 * @author: cuihao
 * @create: 2020-03-29 23:36
 **/
public abstract class Decorator extends Component {
    private Component component = null;

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void cost() {
        // 掉了原生方法
        this.component.cost();
    }
}